<template>
	<view>
		<block v-for="(item,index) in list" :key="index">
			<common-list :item="item" :index="index" @follow="follow"></common-list>
			<!-- 全局分割线 -->
			<divider></divider>
		</block>
	</view>
</template>

<script>
	// @/代表从根目录开始
	import commonList from "@/components/common/common-list.vue"
	export default {
		components:{
			commonList
		},
		data() {
			return {
				list:[
					{
						username:"昵称",
						userpic:"../../static/default.jpg",
						newstime:"2019-12-01 下午03：00",
						isFollow:false,
						title:"我是标题",
						titlepic:"../../static/demo/datapic/11.jpg",
						support:{
							type:"support",
							support_count:1,
							unsupport_count:2
						},
						comment_count:3,
						share_num:2
					},
					{
						username:"昵称",
						userpic:"../../static/default.jpg",
						newstime:"2019-12-01 下午03：00",
						isFollow:false,
						title:"我是标题",
						titlepic:"",
						support:{
							type:"support",
							support_count:1,
							unsupport_count:2
						},
						comment_count:3,
						share_num:2
					}
				]
			}
		},
		onLoad() {

		},
		methods: {
			// 关注
			follow(e){
				// console.log(e);
				this.list[e].isFollow = true
				uni.showToast({title:'关注成功'})
			}
		}
	}
</script>

<style>
	
</style>
